#post请求实战
import urllib.request
import urllib.parse
posturl = "http://www.iqianyue.com/mypost/"
postdata = urllib.parse.urlencode({
    "name" : "ceo@txk7.com",
    "pass" : "kjsahgjkashg",
    }).encode("utf-8")
#进行post，就需要使用urllib.request下面的Request(真实post地址,post数据)
req = urllib.request.Request(posturl,postdata)
rst = urllib.request.urlopen(req).read().decode("utf-8")
print(rst)
exit()
fh = open("./te.html","w")
fh.write(rst)
fh.close()